home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
fish
/
751-760
/
753
/
yak
/
yak.doc
< prev
next >
Wrap
Text File
|
1995-03-18
|
11KB
|
314 lines
Yak 1.0 (c) 1992, Martin W. Scott. All Rights Reserved.
--------------------------------------------------------
[Needs KickStart 2.04 or above]
Yak stands for "Yet Another Kommodity" (never was any good at speling),
and is a mouse/window manipulation program along the same lines as DMouse,
MightyMouse etc.
Why write another one? None of the others (and I've looked at almost all of
them) were quite right for me. Yak has the following features:
- AutoPoint (sunmouse) that only activates when mouse stops;
(Compatible with SiliconMenus' Iris menus)
- KeyActivate windows (when key pressed);
- Click windows to front or back;
- Cycle screens with mouse;
- Mouse and Screen blanking;
- Close/Zip/Shrink/Enlarge windows with programmable hotkeys;
- Activate Workbench by hotkey (to get at menus when WB obscured);
- Pop up a palette on front screen (requires reqtools.library);
- Insert date (in various formats);
- KeyClick with adjustable volume;
- PopCommand key for starting a command (like PopCLI);
- Nice gadtools settings window;
- All settings accessible from Workbench tooltypes;
Look familiar? It's a combination of the AutoPoint, ClickToFront, Blanker
and IHelp standard commodities (on the Extras disk) with a hint of
KCommodity and DMouse thrown in. And it's quite small, about 11K. It uses
about 18K when running. If you use just two of the standard commodities,
you'll save memory by using Yak.
What Yak doesn't do
-------------------
Yak only has a plain screen-blanker. Since the introduction of OS 2.0,
there has been a profusion of fancy screen blankers, such as Spliner (which
I use), ASwarm (various incarnations), FracBlank and more. I think most
people have their own favourite fancy blanker, so I didn't include one in
Yak.
There is no mouse-acceleration. The system default one (settable via the
Input preferences) is more than adequate as far as I am concerned. If I get
enough requests, I'll add faster acceleration.
How to use Yak
--------------
Yak is designed to be run from the sys:WBStartup drawer, and accepts many
tooltypes to let you configure it. It can be started from the Shell, but
that is less convenient.
The tooltypes accepted come in four general categories:
BOOLEAN true/yes/on responses are "YES", "ON", "TRUE".
Anything else means false/no/off.
HOTKEY a valid hotkey definition string. Full details of
valid definitions are given in the OS 2.0
user-manual (section 5 of mine) so I'll not
replicate them here.
INTEGER a (possibly) signed integer.
STRING an arbitrary string.
The many tooltypes are:
ToolType Category Description Default (1)
---------------------------------------------------------------------------
(Standard commodity tooltypes)
CX_POPKEY HOTKEY Key to show settings window RCommand Help
CX_PRIORITY INTEGER Priority of this commodity 0
CX_POPUP BOOLEAN Show settings window on startup NO
(KeyClick tooltypes)
VOLUME INTEGER Keyclick volume (0-64) 48
(Screen-blanking tooltypes)
SCRTIMEOUT INTEGER Screen-blanking timeout (0-9999) 300 seconds
(Date insertion tooltypes)
DATEFORMAT (3) INTEGER Format for date (0-3) 0
DAY BOOLEAN Insert day YES
DATE BOOLEAN Insert date YES
TIME BOOLEAN Insert time NO
(Mouse-control tooltypes)
AUTOPOINT BOOLEAN see below ON
KEYACTIVATE BOOLEAN see below OFF
CLICKTOFRONT BOOLEAN see below ON
CLICKTOBACK BOOLEAN see below ON
SCREENCYCLE BOOLEAN see below ON
MOUSEBLANK BOOLEAN see below ON
(Hotkeys for window manipulation etc)
CLOSEWINDOW HOTKEY Key to close active window Control esc
ZIPWINDOW HOTKEY Key to 'zip' active window Control z
MAKESMALL HOTKEY Key to shrink active window LCommand [
MAKEBIG HOTKEY Key to enlarge active window LCommand ]
WORKBENCH HOTKEY Key to activate Workbench LCommand w
PALETTE HOTKEY Key to pop-up palette LCommand p
POPCOMMKEY HOTKEY Key to run PopCommand LCommand esc
INSERTDATE HOTKEY Key to insert date LCommand d
POPCOMMAND STRING Command for POPCOMMKEY hotkey NewShell ...
You should also have the tooltype "DONOTWAIT" set if you want to start Yak
from your sys:WBStartup drawer. There are so many different tooltypes that
I may use a config file instead in a future version.
Hopefully, you'll be happy enough with the defaults and only have to set a
few tooltypes.
The meanings of all the tooltypes will become apparent in the discussion on
the Settings window.
The Settings Window
-------------------
Once Yak is started, you may bring up its settings window by pressing
RCommand Help (i.e. the Right Amiga key and the Help key). This
key-sequence is configurable.
A fairly large window with many gadgets will appear, grouped under
headings. From top-to-bottom, left-to-right, they are:
Yak Hotkeys
-----------
Here is where you edit the hotkeys for specific actions. Those
actions are:
Show this window bring up the settings window
Close window close currently active window (c.a.w.)
Zip window zip c.a.w. (like clicking on zip gadget)
Shrink window make c.a.w. as small as possible
Enlarge window make c.a.w. as large as possible
Activate WBench activate (a) Workbench window
Palette bring up palette on front screen
PopCommand execute PopCommand (see below)
Insert date write date into c.a.w.
To change an action's hotkey, click over the action, then edit the
string gadget below as desired. The Activate WBench hotkey gives
access to the Workbench menus when the Workbench is obscured by an
application-window (e.g. an editor or shell).
Click Volume
------------
Controls the volume of the KeyClick. A volume of zero means 'no
click' (yes, that's obvious, but when set to zero, the audio device
won't be opened at all).
Date Format
-----------
These gadgets control the format of the date used by the Insert
date hotkey. Their usage should be fairly obvious.
PopCommand
----------
This string gadget holds the command that will be executed when the
PopCommand hotkey is pressed. Note that it is not run
asynchronously; some aspects of Yak will be disabled until the
command is finished (but commands like NewShell return
immediately).
Mouse Options
-------------
Here are various toggles for the mouse manipulation features.
AutoPoint Activate window under mouse. This behaves almost
exactly like Commodore's AutoPoint commodity, in
that it only activates a window when the mouse has
stopped moving (so there is a small delay). The
difference is that Yak's AutoPoint works with
SiliconMenus with Iris menus on - it won't go
activating windows while you're making your menu
choice. (By the way, GET SiliconMenus!)
Key Activate Activates window under mouse when key is pressed.
You should only need one of AutoPoint or
KeyActivate.
Click To Front Bring a window to the front of others by
double-clicking over it.
Click To Back Move a window to the back of others by
pressing and holding the left mousebutton, then
clicking the right mousebutton.
Screen Cycle Using the same mouse sequence as Click To Back,
move a screen to the back of others if:
either the window under the mouse is a backdrop
window (like the main Workbench window)
or there is only one window on the screen.
Screen Cycle only works when the mouse is BELOW the
screen's titlebar (due to confilcts with other
programs).
Mouse Blanking Blank the mouse pointer when a key is pressed. The
mouse pointer is restored when the mouse is moved.
The mouse pointer will also blank after a 5 second
period of inactivity. (See problems below.)
Screen Timeout
--------------
If no user input (mouse or keyboard) occurs over this period (of
seconds), the screen will blank. Set it to 0 to disable screen
blanking altogether.
Hide
----
Close the settings window, leaving Yak running.
(The window's close gadget has the same effect).
Quit
----
Terminate Yak.
You may also control Yak using the Commodities Exchange program on the
Workbench disk. Consult your user-guide for details on this.
Ending Yak
----------
Yak can be terminated in the following ways:
From the settings window, select Quit;
From the Commodities Exchange, select Kill;
By sending the Yak process a ^C signal.
Problems
--------
There are a few problems that I am currently aware of. Firstly, a shell
created by the PopCommand hotkey doesn't have the paths or stack set at
boot-time (in the Startup-Sequence). Your Shell-Startup file should set any
paths and the stack you need. (I use a PATH environment variable, which is
referenced in both my Startup-Sequence and Shell-Startup, so that changes
made happen in both places.)
When the Palette is opened, no other hotkeys work, and the keyclicking is
disabled. There is a way to open a Palette requester asynchronously using
reqtools, but I've yet to look into it.
Mouse blanking is performed by turning the sprites off. I know that this is
a bit dirty, but just clearing the pointer holds problems too. See the
source (file "handler.c") for further details. If you know of a workaround,
I'd appreciate you letting me know.
The Close window hotkey doesn't work for shell windows. This is because
they handle intuition events differently from other windows.
Distribution
------------
Yak is freely redistributable, copyrighted software. The source is included,
and you are permitted to modify it for personal use, but any modifications
made must NOT be distributed. If you have made changes you think others
would like, send them to me and I'll include them in future versions.
Although Yak is freeware, donations would be gladly accepted, either money
or stuff you've written yourself. I would be grateful if you would let me
know if you use Yak, so I can judge whether it's worth releasing upgrades.
A postcard or email message would be fine.
Credits
-------
Yak is written entirely in C, and compiled with SAS/C 5.10a. The Settings
window gadgetry was created using GadToolsBox, from Jaba Development. If
you are an Amiga developer, you really should get a hold of GadToolsBox.
Yak makes use of reqtools.library, which is Copyright Nico François.
Thanks must also go to Mike Meyer et. al. for Mg3, Steve Koren for SKsh,
Matt Dillon for DMouse (which answered many of my how-to questions), and
Kai Iske for KCommodity, which is where the KeyClick sound was 'borrowed'.
Contact
-------
Send bug-reports, comments, suggestions, donations, postcards etc. to:
Martin W. Scott,
23, Drum Brae North,
Edinburgh, EH4 8AT
United Kingdom.
or by e-mail: mws@castle.ed.ac.uk
but I will be switching accounts in Oct '92, so if mail bounces around
then, please try again a couple of weeks later, or use postal mail.
Cheers,
Martin.